package com.posjiajia.user.operator.controller;

import com.posjiajia.user.core.bo.MenuBo;
import com.posjiajia.user.core.vo.MenuVo;
import com.posjiajia.user.operator.vo.result.ListMenusResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @ClassName MenuController
 * @Description 菜单控制器
 *
 * @author sunhaojie 3113751575@qq.com
 * @date 2016年8月21日 下午8:12:06
 */
@RequestMapping("menu")
@Controller
public class MenuController {
	
	@Autowired
	private MenuBo menuBo;
	
	@RequestMapping("list_menus")
	@ResponseBody
	public ListMenusResult listMenus() {
		List<MenuVo> menuLinkList = menuBo.menuList(null);
		ListMenusResult result = new ListMenusResult();
		result.setStatus(200);
		result.setMenus(menuLinkList);
		return result;
	}
}
